package com.tsj.model.model.vo;

/**
 * @author taoshujian
 * @version 1.0
 * @since 2025-10-24 11:04:17
 */
public class AttachmentInfo {
    private String fileName;
    private String cellAddress;
    private String type;
    private String format; // 格式（字符串类型，如"jpg"）
    private byte[] content; // 内容（字节数组）

    // 构造函数参数顺序：文件名、单元格、类型、格式、内容
    public AttachmentInfo(String fileName, String cellAddress, String type, String format, byte[] content) {
        this.fileName = fileName;
        this.cellAddress = cellAddress;
        this.type = type;
        this.format = format;
        this.content = content;
    }

    // 构造函数参数顺序：文件名、单元格、类型、格式、内容
    public AttachmentInfo(String fileName, String cellAddress, String type, byte[] content) {
        this.fileName = fileName;
        this.cellAddress = cellAddress;
        this.type = type;
        this.content = content;
    }

    @Override
    public String toString() {
        return String.format("【%s】%s（单元格：%s，格式：%s，大小：%d字节）",
                type, fileName, cellAddress, format, content.length);
    }
}
